package com.hxkj.dao.impl;


import com.hxkj.dao.CommonPaymentDao;
import com.hxkj.domain.po.CommonPayment;
import com.hxkj.mapper.CommonPaymentMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: yangjianguo
* @version: 1.0
* @datetime: 2019-01-15 14:30:54
*
*/
@Service("commonPaymentDao")
public class CommonPaymentDaoImpl implements CommonPaymentDao {

    @Resource
    private CommonPaymentMapper commonPaymentMapper;

    @Override
    public CommonPayment get(String id) {
        return commonPaymentMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<CommonPayment> get(CommonPayment commonPayment) {
        return commonPaymentMapper.select(commonPayment);
    }

    @Override
    public int delete(String id) {
        return commonPaymentMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int save(CommonPayment commonPayment) {
        return commonPaymentMapper.insert(commonPayment);
    }

    @Override
    public int update(CommonPayment commonPayment) {
        return commonPaymentMapper.update(commonPayment);
    }
}
